package org.kl.bf.repository.basic;

import java.util.List;

import org.kl.bf.entity.basic.Function;
import org.kl.bf.repository.BasicRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface FunctionDao extends BasicRepository<Function, String>, JpaSpecificationExecutor<Function> {
	List<Function> findByFunctionNoAndMenuId(String functionNo, String menuId);
	List<Function> findByMenuId(String menuId);
	
	@Modifying
	@Query("delete from Function sd  where sd.id = ?1")
	int deleteById(String id);
}
